package cli

import (
	"os"

	"github.com/jessevdk/go-flags"
)

//Options 命令行选选项
type Options struct {
	Share     bool `short:"s" long:"share" description:"构建当前业绩分配关系到缓存"`
	Install   bool `short:"i" long:"install" description:"安装应用"`
	Uninstall bool `short:"u" long:"uninstall" description:"停止应用"`
}

//Opts 命令行选选项实例
var Opts Options

//ParseOptions 解析命令行选项
func ParseOptions() error {
	_, err := flags.ParseArgs(&Opts, os.Args)
	if err != nil {
		return err
	}
	return nil
}
